﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.ComponentModel;

namespace GroceryPriceBook.Core.ViewModel
{
	public class PurchaseLog
	{
		public PurchaseLog()
		{
			PurchaseDate = DateTime.Today;
			Store = new Store();
		}

		public System.Guid Id { get; set; }
		public System.Guid StoreId { get; set; }

		[DisplayName("Purchase Date")]
		[DataType(DataType.Date)]
		[DisplayFormat(DataFormatString = "{0:MM-dd-yyyy}", ApplyFormatInEditMode = true)]
		public System.DateTime PurchaseDate { get; set; }

		[DisplayName("Total Cost")]
		[DataType(DataType.Currency)]
		public decimal TotalCost { get; set; }

		[StringLength(300)]
		[DataType(DataType.MultilineText)]
		public string Note { get; set; }

		public Store Store { get; set; }
		public List<PurchaseLogItem> PurchaseLogItems { get; set; }
		public IEnumerable<SelectListItem> PurchaseLogSelectListItems { get; set; }
		public IEnumerable<SelectListItem> StoreSelectListItems { get; set; }

	}
}
